#ifndef IMAGEVIEW_H
#define IMAGEVIEW_H

#include <QGraphicsView>

class ImageViewPrivate;
class ImageView : public QGraphicsView
{
	Q_OBJECT
	Q_PROPERTY(bool scaleVisible READ isScaleVisible WRITE setScaleVisible)
	Q_PROPERTY(QSize scaleSize READ scaleSize WRITE setScaleSize)
	Q_PROPERTY(QColor scaleColor READ scaleColor WRITE setScaleColor)
	Q_PROPERTY(uint scaleLength READ scaleLength WRITE setScaleLength)
public:
	ImageView(QWidget *parent);
	~ImageView();
public:
	bool isScaleVisible() const;	
	QImage image() const;
	QSize scaleSize() const;
	QColor scaleColor() const;
	uint scaleLength() const;
public slots:
	void setImage(const QImage&);
	void setScaleVisible(const bool);
	void setScaleSize(const QSize&);
	void setScaleColor(const QColor&);
	void setScaleLength(const uint);
protected:
    ImageView(ImageViewPrivate &dd, QWidget *parent = 0);
protected:
	virtual void paintEvent(QPaintEvent* event);
	virtual void paintImage();
	virtual void paintScale();	
	QScopedPointer<ImageViewPrivate> d_ptr;
private:	
	Q_DECLARE_PRIVATE(ImageView);
	Q_DISABLE_COPY(ImageView);
	
};

#endif // IMAGEVIEW_H
